package com.kaishengit.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.kaishengit.pojo.Project;
import com.kaishengit.pojo.User;
import com.kaishengit.service.ProjectService;
import com.kaishengit.service.UserService;

@Controller
public class UserAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	private User user;
	private ProjectService projectService;
	private UserService userService;
	private List<Project> projectList;
	private List<User> userList;
	
	@Override
	public String execute() throws Exception {
		
		projectList = projectService.findAll();
		userList = userService.findAll();
		return "success";
	
	}


	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}



	@Autowired
	public void setProjectService(ProjectService projectService) {
		this.projectService = projectService;
	}
	@Autowired
	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	
	public List<Project> getProjectList() {
		return projectList;
	}


	public void setProjectList(List<Project> projectList) {
		this.projectList = projectList;
	}
	public List<User> getUserList() {
		return userList;
	}


	public void setUserList(List<User> userList) {
		this.userList = userList;
	}
	
	
	
}
